package com.qf.service.impl;

import com.qf.mapper.UserMapper;
import com.qf.pojo.User;
import com.qf.service.UserService;
import com.qf.utils.MyBatisUtils;


public class UserServiceIpml implements UserService {
    @Override
    public Boolean findUserByName(String username) {
        //调用mybatis的工具类
        UserMapper mapper = MyBatisUtils.getMapper(UserMapper.class);

        //访问数据
        User user = mapper.findUserByUsername(username);
        //判断
        if (user!=null){
            return true;
        }
        return false;
    }
}
